package com.dataart.productshop.dao;

import com.dataart.productshop.model.FileInfo;
import com.dataart.productshop.model.Type;

import java.util.List;

public interface FileInfoDao extends BaseDao<FileInfo>{

	List<FileInfo> getHundredByDownloads ();
	
	/**
	 * get List of FileInfos places in decade order by downloads and date
	 * 
	 * @param from number of element, in sorted by download and date list, which started
	 * to put in list from
	 * @param amount number of elements which will be max put in list
	 * @return list of FileInfo elements
	 */
	List<FileInfo> getByDownloads (int from, int amount);
	
	void saveFileInfo(FileInfo input);
	
	List<FileInfo> getByType(Type type);
	
	List<FileInfo> getByType(Type type, int from, int amount);
	
	void delete(Long id);
	
}
